<html>
<head><meta charset="utf-8"><title>Debug output inside compiler · new members · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122652-new-members/index.html">new members</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122652-new-members/topic/Debug.20output.20inside.20compiler.html">Debug output inside compiler</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="197940574"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122652-new%20members/topic/Debug%20output%20inside%20compiler/near/197940574" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Christopher Jefferson <a href="https://rust-lang.github.io/zulip_archive/stream/122652-new-members/topic/Debug.20output.20inside.20compiler.html#197940574">(May 18 2020 at 14:15)</a>:</h4>
<p>Is there a way of printing out integers while deep inside the compiler (or is there a better way of tracking what is going on). I wanted to understand what is going on inside src/liballoc/raw_vec.rs . The standard tools like println! and dbg! don't seem to work in here.</p>



<a name="198408432"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122652-new%20members/topic/Debug%20output%20inside%20compiler/near/198408432" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Claire Nord <a href="https://rust-lang.github.io/zulip_archive/stream/122652-new-members/topic/Debug.20output.20inside.20compiler.html#198408432">(May 22 2020 at 05:59)</a>:</h4>
<p>Hi Christopher, see this section of the rustc dev guide on logging output: <a href="https://rustc-dev-guide.rust-lang.org/compiler-debugging.html?highlight=rustc_log#getting-logging-output">https://rustc-dev-guide.rust-lang.org/compiler-debugging.html?highlight=rustc_log#getting-logging-output</a></p>
<p>In particular, you need to set the <code>RUSTC_LOG</code> environment variable and add logging with <code>log::{debug, info, warn}</code>.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>